const { v4 } = require('uuid');

const DbService = require('./db2');
const BaseService = require('./base');
const { TABLE_NAME } = require('../models');

class WorkerSignRecord extends BaseService {
  constructor() {
    super();
    this.dbService = new DbService(TABLE_NAME.workerSignRecord);
  }

  async create(data) {
    const record = {
      ...data,
      id: v4(),
      createdOn: new Date(),
    };
    return this.dbService.insert(record);
  }
}

module.exports = WorkerSignRecord;
